#ifndef _EBC_TYPE_H_
#define _EBC_TYPE_H_

#include "ecm_types.h"

#define ECM_SOCKADDR_MAX	20

typedef ecm_ptr_t	ecm_selection_t;
typedef ecm_uint32	ecm_selection_event_t;
typedef char		ecm_sockaddr_t[ECM_SOCKADDR_MAX];

#define ECM_READ_EVENT		0x01
#define ECM_WRITE_EVENT		0x02
#define ECM_ACCEPT_EVENT	0x04
#define ECM_ALL_EVENT		0xff

typedef enum {
	ECM_SOCK_TYPE_TCP = 0x01,
	ECM_SOCK_TYPE_UDP = 0x02,
	ECM_SOCK_TYPE_EOF = ECM_SOCK_TYPE_UDP
} ecm_sock_type_t;

typedef enum {
	ECM_SOCK_OPT_REUSEADDR = 0x01,
	ECM_SOCK_OPT_SNDBUF = 0x02,
	ECM_SOCK_OPT_RCVBUF = 0x03,
	ECM_SOCK_OPT_BROADCAST = 0x04,
	ECM_SOCK_OPT_ADD_MEMBERSHIP = 0x05,
	ECM_SOCK_OPT_EOF = ECM_SOCK_OPT_ADD_MEMBERSHIP
} ecm_sock_opt_t;

#endif
